<template>
    <div class="x-content-box">
        <h1 class="x-title">{{ props.title }}</h1>
        <slot name="extra"></slot>
        <slot></slot>
    </div>
</template>
<script setup>
const props = defineProps({
    title: {
        type: String
    }
})
</script>
<style lang="less" scoped>
.x-content-box {
    position: relative;
}

.x-content-box + .x-content-box {
    margin-top: 16px;
}

.x-title {
    display: inline-block;
    margin: 0;
    padding: 12px 0;
    font-size: 16px;
    color: var(--font-color1);
    font-weight: 500;
    text-indent: 12px;
    line-height: 28px;
    position: relative;
}

.x-title::after {
    content: '';
    width: 4px;
    height: 16px;
    background-color: var(--primary-color);
    border-radius: 4px;
    position: absolute;
    left: 0;
    top: 18px;
}
</style>
